using System;
using System.Data.SqlClient;

using System.Collections.Generic;
using System.Text;

using AIFSDataAccessLayer;

namespace AIFSCMSDataAccessLayer
{
    public class DefaultConnectionProvider : IConnectionProvider
    {
        #region IConnectionProvider Members

        public System.Data.SqlClient.SqlConnection GetConnection()
        {
            try
            {
                SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["AIFSContentManagementSystem.Properties.Settings.AIFSCMSConnectionString"].ConnectionString);
                return con;
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Could not create connection to CiBills", ex);
            }
        }

        #endregion
    }
}
